<script setup>
import { addFrontErr } from "@/api/base";
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
onLaunch((query) => {
    console.log(query, "App Launch");

    // #ifdef APP-PLUS
    // 强制竖屏
    plus.screen.lockOrientation("portrait-primary");
    // #endif

    if(process.env.NODE_ENV === 'production') {
        const sysConfig = uni.getSystemInfoSync()
        addFrontErr({
            errMsg: JSON.stringify({
                msg: '小程序启动',
                UUID: uni.getStorageSync('__DC_STAT_UUID'),
                brand: sysConfig.brand,
                model: sysConfig.model,
                platform: sysConfig.platform,
                system: sysConfig.system,
                version: sysConfig.version,
                SDKVersion: uni.SDKVersion,
            }),
            platform: "zulin_ali_launch",
            remark: '小程序启动',
        })
    }
});
onShow(() => {
    console.log("App Show");
});
onHide(() => {
    console.log("App Hide");
});
</script>
<style lang="scss" src="@/styles/fonts.scss"></style>
<style lang="scss" src="@/styles/reset.scss"></style>
